package com.task.service.impl;

import com.task.bean.Evaluate;
import com.task.mapper.EvaluateMapper;
import com.task.service.IEvaluateService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.task.vo.EvaAndNameVo;
import com.task.vo.EvaAndTeaVo;
import com.task.vo.EvaluateAndStuVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author liuzhe
 * @since 2021-04-10
 */
@Service
public class EvaluateServiceImpl extends ServiceImpl<EvaluateMapper, Evaluate> implements IEvaluateService {

    @Autowired
    private EvaluateMapper evaluateMapper;

    @Override
    public List<EvaluateAndStuVo> queryStuAndEvaByTeaId(int teaId) {
        return evaluateMapper.queryStuAndEvaByTeaId(teaId);
    }

    @Override
    public List<EvaAndTeaVo> queryStuEvaluateByStuId(int stuId) {
        return evaluateMapper.queryStuAndTeaAndEvaByStuId(stuId);
    }

    @Override
    public EvaAndNameVo getEvaAndNameById(int id) {
        return evaluateMapper.getEvaAndNameById(id);
    }

    @Override
    public List<Evaluate> queryEvaluateByStuId(Integer id) {
        return evaluateMapper.queryEvaluateByStuId(id);
    }
}
